package com.hc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class DispatcherController {

    @GetMapping("/category")
    public String category() {
        return "admin/category";
    }

    @GetMapping("/categoryAdd")
    public String categoryAdd() {
        return "category-add-update";
    }


    @GetMapping("/index")
    public String index(Model model) {
        System.out.println("index");
        model.addAttribute("user", "梁云亮");
        return "index";
    }

    @GetMapping("/blog")
    public String blog() {
        return "blog";
    }

    @GetMapping("/tag")
    public String tag() {
        return "tag";
    }

    @GetMapping("/archive")
    public String archive() {
        return "archive";
    }

    @GetMapping("/about")
    public String about() {
        return "about";
    }

    @GetMapping("/default")
    public String defaulf() {
        return "admin/default";
    }

    @GetMapping("/demo")
    public String demo() {
        return "demo";
    }

}
